package com.zyp.test.test;

import android.animation.TypeEvaluator;

/**
 * @author zyp
 *         2017/12/27
 */

public class PointEvaluator implements TypeEvaluator<MyPoint> {
    @Override
    public MyPoint evaluate(float fraction, MyPoint startValue, MyPoint endValue) {
        //Log.d("evaluate",fraction+"");
        float resultX = startValue.getX() + fraction * (endValue.getX() - startValue.getX());
        float resultY = startValue.getY() + fraction * (endValue.getY() - startValue.getY());
        return new MyPoint(resultX,resultY);
    }
}
